package com.wang.controller;

import com.wang.entity.User;
import com.wang.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Classname UserController
 * @Description TODO
 * @Date 2024/4/29 9:34
 * @Created by pc
 */
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/find")
    public List<User> findAll(){
        return userService.findAll();
    }
}
